import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [{
  node: 'history',
  path: "/",
  name: "Home",
  redirect: "/login"
},
{
  path: '/login',
  name: 'login/index',
  component: () => import( /* webpackChunkName: "about" */ '../views/login/index.vue')
},
{
  path: '/home',
  name: 'home',
  component: () => import( /* webpackChunkName: "about" */ '../views/home/index.vue'),
  redirect: "/home/studentadmintion",
  children: [
    {
      path: "/home/studentadmintion",
      name: "studentadmintion",
      name: 'studentadmintion',
      component: () => import( /* webpackChunkName: "about" */ '../views/home/studentadmintion.vue'),
      redirect: "/home/studentadmintion/xueyuanzi",
      children: [
        {
          path: '/home/studentadmintion/xueyuanzi',
          name: "xueyuanzi",
          component: () => import( /* webpackChunkName: "about" */ '../views/home/xueyuanzi.vue'),
        },
        {
          path: '/home/studentadmintion/studentimgs',
          name: "xueyuanzi",
          component: () => import( /* webpackChunkName: "about" */ '../views/home/studentimgs.vue'),
        },
        {
          path: '/home/studentadmintion/zhujiao',
          name: "xueyuanzi",
          component: () => import( /* webpackChunkName: "about" */ '../views/home/zhujiao.vue'),
        },
      ]
    },
  ]
},
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes
});

export default router;